<html>
<head>
<title>E:\QProjects\Lisp\toygen\inter\core.lisp.html</title>
<meta name="Generator" content="Vim/7.0">
<meta http-equiv="content-type" content="text/html; charset=windows-1251">
</head>
<body bgcolor="#ffffff" text="#000000">
<pre>
<font color="#804040">  1 </font>
<font color="#804040">  2 </font>
<font color="#804040">  3 </font><span class="Comment">;</span>
<font color="#804040">  4 </font><span class="Comment">; expr-statements utilities:</span>
<font color="#804040">  5 </font><span class="Comment">; mapping table: *expr-statements*, definition helper: def-expr-handler,</span>
<font color="#804040">  6 </font><span class="Comment">; caller helper: call-expr-handler</span>
<font color="#804040">  7 </font><span class="Comment">;</span>
<font color="#804040">  8 </font><span class="Special">(</span><span class="Statement">setf</span><span class="lispList"> </span><span class="Type">*expr-statements*</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">make-hash-table</span><span class="Special">))</span>
<font color="#804040">  9 </font>
<font color="#804040"> 10 </font><span class="Special">(</span><span class="Statement">defmacro</span><span class="lispList"> </span><span class="lispSymbol">def-expr-handler</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">expr-name</span><span class="lispList"> </span><span class="lispSymbol">args</span><span class="lispList"> </span><span class="lispSymbol">&amp;rest</span><span class="lispList"> </span><span class="lispSymbol">body</span><span class="Special">)</span>
<font color="#804040"> 11 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">assert</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">and</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">symbolp</span><span class="lispList"> </span><span class="lispSymbol">expr-name</span><span class="Special">)</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">listp</span><span class="lispList"> </span><span class="lispSymbol">args</span><span class="Special">)))</span>
<font color="#804040"> 12 </font><span class="lispLeadWhite">  </span><span class="PreProc">`(</span><span class="Statement">progn</span>
<font color="#804040"> 13 </font><span class="lispLeadWhite">     </span><span class="Special">(</span><span class="Statement">if</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">gethash</span><span class="lispList"> </span><span class="Special">'</span><span class="Identifier">,expr-name</span><span class="lispList"> </span><span class="Type">*expr-statements*</span><span class="Special">)</span>
<font color="#804040"> 14 </font><span class="lispLeadWhite">       </span><span class="Special">(</span><span class="Statement">error</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">format</span><span class="lispList"> </span><span class="Statement">nil</span><span class="lispList"> </span><span class="Constant">&quot;redefinition of ~a&quot;</span><span class="lispList"> </span><span class="lispSymbol">expr-name</span><span class="Special">)))</span>
<font color="#804040"> 15 </font><span class="lispLeadWhite">     </span><span class="Special">(</span><span class="Statement">setf</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">gethash</span><span class="lispList"> </span><span class="Special">'</span><span class="Identifier">,expr-name</span><span class="lispList"> </span><span class="Type">*expr-statements*</span><span class="Special">)</span>
<font color="#804040"> 16 </font><span class="lispLeadWhite">           </span><span class="Special">(</span><span class="Statement">lambda</span><span class="lispList"> ,</span><span class="lispSymbol">args</span><span class="lispList"> ,</span><span class="lispSymbol">@body</span><span class="Special">))</span>
<font color="#804040"> 17 </font><span class="lispLeadWhite">     </span><span class="PreProc">)</span><span class="Special">)</span>
<font color="#804040"> 18 </font>
<font color="#804040"> 19 </font><span class="Special">(</span><span class="Statement">defun</span><span class="lispList"> </span><span class="lispSymbol">call-expr-handler</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">expr-name</span><span class="lispList"> </span><span class="lispSymbol">indent</span><span class="lispList"> </span><span class="lispSymbol">args</span><span class="Special">)</span>
<font color="#804040"> 20 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">assert</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">and</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">symbolp</span><span class="lispList"> </span><span class="lispSymbol">expr-name</span><span class="Special">)</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">list</span><span class="lispList"> </span><span class="lispSymbol">args</span><span class="Special">)))</span>
<font color="#804040"> 21 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">let</span><span class="lispList"> </span><span class="Special">((</span><span class="lispSymbol">handler</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">gethash</span><span class="lispList"> </span><span class="lispSymbol">expr-name</span><span class="lispList"> </span><span class="Type">*expr-statements*</span><span class="Special">)))</span>
<font color="#804040"> 22 </font><span class="lispLeadWhite">    </span><span class="Special">(</span><span class="Statement">unless</span><span class="lispList"> </span><span class="lispSymbol">handler</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">error</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">format</span><span class="lispList"> </span><span class="Statement">nil</span><span class="lispList"> </span><span class="Constant">&quot;expression handler '~a' is undefined&quot;</span>
<font color="#804040"> 23 </font><span class="lispLeadWhite">                                   </span><span class="lispSymbol">expr-name</span><span class="Special">)))</span>
<font color="#804040"> 24 </font>
<font color="#804040"> 25 </font><span class="lispLeadWhite">    </span><span class="Comment">; return the evaluated expression</span>
<font color="#804040"> 26 </font><span class="lispLeadWhite">    </span><span class="Special">(</span><span class="Statement">eval</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">append</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">list</span><span class="lispList"> </span><span class="Special">'</span><span class="Identifier">funcall</span><span class="lispList"> </span><span class="lispSymbol">handler</span><span class="Special">)</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">list</span><span class="lispList"> </span><span class="lispSymbol">indent</span><span class="Special">)</span><span class="lispList"> </span><span class="lispSymbol">args</span><span class="Special">))</span>
<font color="#804040"> 27 </font><span class="lispLeadWhite">    </span><span class="Special">))</span>
<font color="#804040"> 28 </font>
<font color="#804040"> 29 </font><span class="Comment">;</span>
<font color="#804040"> 30 </font><span class="Comment">; expression handler:</span>
<font color="#804040"> 31 </font><span class="Comment">; (if predicate-expression then-statement &amp;optional else-statement)</span>
<font color="#804040"> 32 </font><span class="Comment">;</span>
<font color="#804040"> 33 </font><span class="Special">(</span><span class="lispSymbol">def-expr-handler</span><span class="lispList"> </span><span class="Statement">if</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">indent</span><span class="lispList"> </span><span class="lispSymbol">predicate-expression</span><span class="lispList"> </span><span class="lispSymbol">then-block</span><span class="lispList"> </span><span class="lispSymbol">&amp;optional</span><span class="lispList"> </span><span class="lispSymbol">else-block</span><span class="Special">)</span>
<font color="#804040"> 34 </font><span class="lispLeadWhite">                  </span><span class="Special">(</span><span class="lispSymbol">conc-string</span>
<font color="#804040"> 35 </font><span class="lispLeadWhite">                   </span><span class="Constant">&quot;if( &quot;</span>
<font color="#804040"> 36 </font><span class="lispLeadWhite">                   </span><span class="Special">(</span><span class="Statement">format</span><span class="lispList"> </span><span class="Statement">nil</span><span class="lispList"> </span><span class="Constant">&quot;~a&quot;</span><span class="lispList"> </span><span class="lispSymbol">predicate-expression</span><span class="Special">)</span>
<font color="#804040"> 37 </font><span class="lispLeadWhite">                   </span><span class="Constant">&quot; )&quot;</span>
<font color="#804040"> 38 </font>
<font color="#804040"> 39 </font><span class="lispLeadWhite">                   </span><span class="Comment">; add mandatory then-block</span>
<font color="#804040"> 40 </font><span class="lispLeadWhite">                   </span><span class="Type">*new-line*</span>
<font color="#804040"> 41 </font><span class="lispLeadWhite">                   </span><span class="Special">(</span><span class="lispSymbol">stringify-block-expression</span><span class="lispList"> </span><span class="lispSymbol">then-block</span><span class="lispList"> </span><span class="lispSymbol">indent</span><span class="Special">)</span>
<font color="#804040"> 42 </font>
<font color="#804040"> 43 </font><span class="lispLeadWhite">                   </span><span class="Comment">; add optional else-block</span>
<font color="#804040"> 44 </font><span class="lispLeadWhite">                   </span><span class="Special">(</span><span class="Statement">if</span><span class="lispList"> </span><span class="lispSymbol">else-block</span>
<font color="#804040"> 45 </font><span class="lispLeadWhite">                       </span><span class="Special">(</span><span class="lispSymbol">conc-string</span><span class="lispList"> </span><span class="Type">*new-line*</span>
<font color="#804040"> 46 </font><span class="lispLeadWhite">                                    </span><span class="Special">(</span><span class="lispSymbol">stringify-block-expression</span>
<font color="#804040"> 47 </font><span class="lispLeadWhite">                                     </span><span class="lispSymbol">else-block</span><span class="lispList"> </span><span class="lispSymbol">indent</span><span class="Special">)</span>
<font color="#804040"> 48 </font><span class="lispLeadWhite">                                    </span><span class="Special">)</span>
<font color="#804040"> 49 </font><span class="lispLeadWhite">                     </span><span class="Constant">&quot;&quot;</span><span class="Special">)</span>
<font color="#804040"> 50 </font><span class="lispLeadWhite">                   </span><span class="Special">))</span>
<font color="#804040"> 51 </font>
<font color="#804040"> 52 </font><span class="Comment">;</span>
<font color="#804040"> 53 </font><span class="Comment">; (return function-expression)</span>
<font color="#804040"> 54 </font><span class="Comment">;</span>
<font color="#804040"> 55 </font><span class="Special">(</span><span class="lispSymbol">def-expr-handler</span><span class="lispList"> </span><span class="Statement">return</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">indent</span><span class="lispList"> </span><span class="lispSymbol">expr</span><span class="Special">)</span>
<font color="#804040"> 56 </font><span class="lispLeadWhite">                  </span><span class="Special">(</span><span class="lispSymbol">conc-string</span>
<font color="#804040"> 57 </font><span class="lispLeadWhite">                   </span><span class="lispSymbol">indent</span>
<font color="#804040"> 58 </font><span class="lispLeadWhite">                   </span><span class="Constant">&quot;return&quot;</span>
<font color="#804040"> 59 </font><span class="lispLeadWhite">                   </span><span class="Constant">&quot; &quot;</span><span class="lispList"> </span><span class="Comment">; delimeter</span>
<font color="#804040"> 60 </font><span class="lispLeadWhite">                   </span><span class="Special">(</span><span class="lispSymbol">stringify-expression</span><span class="lispList"> </span><span class="lispSymbol">expr</span><span class="lispList"> </span><span class="Constant">&quot;&quot;</span><span class="Special">)</span><span class="lispList"> </span><span class="Comment">; expression statement</span>
<font color="#804040"> 61 </font><span class="lispLeadWhite">                   </span><span class="Constant">&quot;;&quot;</span><span class="lispList"> </span><span class="Comment">; comma delimeter at the end of statement</span>
<font color="#804040"> 62 </font><span class="lispLeadWhite">                  </span><span class="Special">))</span>
<font color="#804040"> 63 </font>
<font color="#804040"> 64 </font><span class="Comment">;</span>
<font color="#804040"> 65 </font><span class="Comment">; expression handler</span>
<font color="#804040"> 66 </font><span class="Comment">;</span>
<font color="#804040"> 67 </font><span class="Comment">;(def-expr-handler)</span>
<font color="#804040"> 68 </font>
<font color="#804040"> 69 </font>
<font color="#804040"> 70 </font><span class="Comment">;</span>
<font color="#804040"> 71 </font><span class="Comment">; stringifies atomic expression</span>
<font color="#804040"> 72 </font><span class="Comment">;</span>
<font color="#804040"> 73 </font><span class="Special">(</span><span class="Statement">defun</span><span class="lispList"> </span><span class="lispSymbol">stringify-variable</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">var-expr</span><span class="lispList"> </span><span class="lispSymbol">indent</span><span class="Special">)</span>
<font color="#804040"> 74 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">assert</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">atom</span><span class="lispList"> </span><span class="lispSymbol">var-expr</span><span class="Special">))</span>
<font color="#804040"> 75 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">format</span><span class="lispList"> </span><span class="Statement">nil</span><span class="lispList"> </span><span class="Constant">&quot;~a&lt;~a&gt;&quot;</span><span class="lispList"> </span><span class="lispSymbol">indent</span><span class="lispList"> </span><span class="lispSymbol">var-expr</span><span class="Special">)</span>
<font color="#804040"> 76 </font><span class="lispLeadWhite">  </span><span class="Special">)</span>
<font color="#804040"> 77 </font><span class="Comment">;</span>
<font color="#804040"> 78 </font><span class="Comment">; stringifies expression being used in the function body</span>
<font color="#804040"> 79 </font><span class="Comment">;</span>
<font color="#804040"> 80 </font><span class="Special">(</span><span class="Statement">defun</span><span class="lispList"> </span><span class="lispSymbol">stringify-expression</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">expr</span><span class="lispList"> </span><span class="lispSymbol">indent</span><span class="Special">)</span>
<font color="#804040"> 81 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">if</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">listp</span><span class="lispList"> </span><span class="lispSymbol">expr</span><span class="Special">)</span>
<font color="#804040"> 82 </font><span class="lispLeadWhite">      </span><span class="Special">(</span><span class="lispSymbol">call-expr-handler</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">car</span><span class="lispList"> </span><span class="lispSymbol">expr</span><span class="Special">)</span><span class="lispList"> </span><span class="lispSymbol">indent</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">cdr</span><span class="lispList"> </span><span class="lispSymbol">expr</span><span class="Special">))</span>
<font color="#804040"> 83 </font><span class="lispLeadWhite">    </span><span class="Special">(</span><span class="lispSymbol">stringify-variable</span><span class="lispList"> </span><span class="lispSymbol">expr</span><span class="lispList"> </span><span class="lispSymbol">indent</span><span class="Special">)</span>
<font color="#804040"> 84 </font><span class="lispLeadWhite">    </span><span class="Special">))</span>
<font color="#804040"> 85 </font>
<font color="#804040"> 86 </font><span class="Comment">;</span>
<font color="#804040"> 87 </font><span class="Comment">; stringifies block expression (i.e. operational structures being</span>
<font color="#804040"> 88 </font><span class="Comment">; used in the function bodies)</span>
<font color="#804040"> 89 </font><span class="Comment">;</span>
<font color="#804040"> 90 </font><span class="Special">(</span><span class="Statement">defun</span><span class="lispList"> </span><span class="lispSymbol">stringify-block-expression</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">block-expression</span><span class="lispList"> </span><span class="lispSymbol">indent-str</span><span class="Special">)</span>
<font color="#804040"> 91 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">assert</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">stringp</span><span class="lispList"> </span><span class="lispSymbol">indent-str</span><span class="Special">))</span>
<font color="#804040"> 92 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">let</span><span class="lispList"> </span><span class="Special">(</span>
<font color="#804040"> 93 </font><span class="lispLeadWhite">        </span><span class="Special">(</span><span class="lispSymbol">result</span><span class="lispList"> </span><span class="lispSymbol">indent-str</span><span class="Special">)</span><span class="lispList"> </span><span class="Comment">; initialize result with indentation string</span>
<font color="#804040"> 94 </font><span class="lispLeadWhite">        </span><span class="Special">(</span><span class="lispSymbol">next-indent-str</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">conc-string</span><span class="lispList"> </span><span class="lispSymbol">indent-str</span><span class="lispList"> </span><span class="Type">*indentation-unit*</span><span class="Special">))</span>
<font color="#804040"> 95 </font><span class="lispLeadWhite">        </span><span class="Special">)</span>
<font color="#804040"> 96 </font><span class="lispLeadWhite">    </span><span class="Comment">; add open brace</span>
<font color="#804040"> 97 </font><span class="lispLeadWhite">    </span><span class="Special">(</span><span class="lispSymbol">append-string</span><span class="lispList"> </span><span class="lispSymbol">result</span><span class="lispList"> </span><span class="Constant">&quot;{&quot;</span><span class="lispList"> </span><span class="Type">*new-line*</span><span class="Special">)</span>
<font color="#804040"> 98 </font>
<font color="#804040"> 99 </font><span class="lispLeadWhite">    </span><span class="Comment">; add each expression</span>
<font color="#804040">100 </font><span class="lispLeadWhite">    </span><span class="Special">(</span><span class="lispSymbol">append-string</span><span class="lispList"> </span><span class="lispSymbol">result</span>
<font color="#804040">101 </font><span class="lispLeadWhite">                     </span><span class="Special">(</span><span class="lispSymbol">stringify-expression</span><span class="lispList"> </span><span class="lispSymbol">block-expression</span><span class="lispList"> </span><span class="lispSymbol">next-indent-str</span><span class="Special">)</span>
<font color="#804040">102 </font><span class="lispLeadWhite">                     </span><span class="Type">*new-line*</span>
<font color="#804040">103 </font><span class="lispLeadWhite">                     </span><span class="Special">)</span>
<font color="#804040">104 </font>
<font color="#804040">105 </font><span class="lispLeadWhite">    </span><span class="Comment">; add close brace</span>
<font color="#804040">106 </font><span class="lispLeadWhite">    </span><span class="Special">(</span><span class="lispSymbol">append-string</span><span class="lispList"> </span><span class="lispSymbol">result</span><span class="lispList"> </span><span class="Constant">&quot;}&quot;</span><span class="lispList"> </span><span class="Type">*new-line*</span><span class="Special">)</span>
<font color="#804040">107 </font>
<font color="#804040">108 </font><span class="lispLeadWhite">    </span><span class="Comment">; return stringified block expression</span>
<font color="#804040">109 </font><span class="lispLeadWhite">    </span><span class="lispSymbol">result</span>
<font color="#804040">110 </font><span class="lispLeadWhite">    </span><span class="Special">)</span>
<font color="#804040">111 </font><span class="lispLeadWhite">  </span><span class="Special">)</span>
<font color="#804040">112 </font>
<font color="#804040">113 </font><span class="Special">(</span><span class="lispSymbol">def-ast-handler</span><span class="lispList"> </span><span class="lispSymbol">test</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">ast-context</span><span class="lispList"> </span><span class="lispSymbol">name</span><span class="Special">)</span>
<font color="#804040">114 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">format</span><span class="lispList"> </span><span class="Statement">t</span><span class="lispList"> </span><span class="Constant">&quot;ast-handler-test (~a ~a)~%&quot;</span><span class="lispList"> </span><span class="lispSymbol">ast-context</span><span class="lispList"> </span><span class="lispSymbol">name</span><span class="Special">)</span>
<font color="#804040">115 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">+</span><span class="lispList"> </span><span class="Constant">1</span><span class="lispList"> </span><span class="Constant">2</span><span class="Special">)</span>
<font color="#804040">116 </font><span class="lispLeadWhite">  </span><span class="Special">)</span>
<font color="#804040">117 </font>
<font color="#804040">118 </font><span class="Special">(</span><span class="lispSymbol">def-ast-handler</span><span class="lispList"> </span><span class="lispSymbol">func</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">ast-context</span>
<font color="#804040">119 </font><span class="lispLeadWhite">               </span><span class="lispSymbol">ret-type</span><span class="lispList"> </span><span class="lispSymbol">name</span><span class="lispList"> </span><span class="lispSymbol">args</span><span class="lispList"> </span><span class="lispSymbol">&amp;key</span>
<font color="#804040">120 </font><span class="lispLeadWhite">               </span><span class="Special">((</span><span class="lispSymbol">:comment</span><span class="lispList"> </span><span class="lispSymbol">comment</span><span class="Special">)</span><span class="lispList"> </span><span class="Statement">nil</span><span class="Special">)</span>
<font color="#804040">121 </font><span class="lispLeadWhite">               </span><span class="Special">((</span><span class="lispSymbol">:body</span><span class="lispList"> </span><span class="lispSymbol">body</span><span class="Special">)</span><span class="lispList"> </span><span class="Statement">nil</span><span class="Special">)</span>
<font color="#804040">122 </font><span class="lispLeadWhite">                       </span><span class="Special">((</span><span class="lispSymbol">:lang-name</span><span class="lispList"> </span><span class="lispSymbol">lang-name</span><span class="Special">)</span><span class="lispList"> </span><span class="lispSymbol">name</span><span class="Special">)</span>
<font color="#804040">123 </font><span class="lispLeadWhite">               </span><span class="Special">)</span>
<font color="#804040">124 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">if</span><span class="lispList"> </span><span class="lispSymbol">comment</span><span class="lispList"> </span><span class="Special">(</span><span class="Statement">format</span><span class="lispList"> </span><span class="Statement">t</span><span class="lispList"> </span><span class="Constant">&quot;// ~a~%&quot;</span><span class="lispList"> </span><span class="lispSymbol">comment</span><span class="Special">))</span>
<font color="#804040">125 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">format</span><span class="lispList"> </span><span class="Statement">t</span><span class="lispList"> </span><span class="Constant">&quot;// ast-context: ~a~%&quot;</span><span class="lispList"> </span><span class="lispSymbol">ast-context</span><span class="Special">)</span>
<font color="#804040">126 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">format</span><span class="lispList"> </span><span class="Statement">t</span><span class="lispList"> </span><span class="Constant">&quot;~a ~a~a~%&quot;</span>
<font color="#804040">127 </font><span class="lispLeadWhite">      </span><span class="Special">(</span><span class="lispSymbol">stringify-typename</span><span class="lispList"> </span><span class="lispSymbol">ret-type</span><span class="Special">)</span>
<font color="#804040">128 </font><span class="lispLeadWhite">      </span><span class="lispSymbol">lang-name</span>
<font color="#804040">129 </font><span class="lispLeadWhite">      </span><span class="Special">(</span><span class="lispSymbol">stringify-arg-list</span><span class="lispList"> </span><span class="lispSymbol">args</span><span class="Special">))</span>
<font color="#804040">130 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="Statement">if</span><span class="lispList"> </span><span class="lispSymbol">body</span>
<font color="#804040">131 </font><span class="lispLeadWhite">    </span><span class="Special">(</span><span class="Statement">format</span><span class="lispList"> </span><span class="Statement">t</span><span class="lispList"> </span><span class="Constant">&quot;~a&quot;</span><span class="lispList"> </span><span class="Special">(</span><span class="lispSymbol">stringify-block-expression</span><span class="lispList"> </span><span class="lispSymbol">body</span><span class="lispList"> </span><span class="Constant">&quot;&quot;</span><span class="Special">)))</span>
<font color="#804040">132 </font><span class="lispLeadWhite">  </span><span class="Special">)</span>
<font color="#804040">133 </font>
<font color="#804040">134 </font><span class="Special">(</span><span class="Statement">setf</span><span class="lispList"> </span><span class="Type">*test-form1*</span><span class="lispList"> </span><span class="Special">'</span><span class="Special">(</span><span class="lispAtomList">func int main </span><span class="Special">(</span>
<font color="#804040">135 </font><span class="lispLeadWhite">                                    </span><span class="Special">(</span><span class="lispAtomList">int argc</span><span class="Special">)</span>
<font color="#804040">136 </font><span class="lispLeadWhite">                                    </span><span class="Special">((</span><span class="lispAtomList">ptr </span><span class="Special">(</span><span class="lispAtomList">ptr </span><span class="Special">(</span><span class="lispAtomList">const </span><span class="Statement">char</span><span class="Special">)))</span><span class="lispAtomList"> argv</span><span class="Special">)</span>
<font color="#804040">137 </font><span class="lispLeadWhite">                                    </span><span class="Special">)</span>
<font color="#804040">138 </font><span class="lispLeadWhite">                          </span><span class="lispAtomList">:lang-name </span><span class="Constant">&quot;main&quot;</span>
<font color="#804040">139 </font><span class="lispLeadWhite">                          </span><span class="lispAtomList">:comment </span><span class="Constant">&quot;defines entry in the console application&quot;</span>
<font color="#804040">140 </font><span class="lispLeadWhite">                          </span><span class="lispAtomList">:body </span><span class="Special">(</span><span class="Statement">return</span><span class="lispAtomList"> 0</span><span class="Special">))</span><span class="Special">)</span>
<font color="#804040">141 </font>
<font color="#804040">142 </font><span class="Special">(</span><span class="Statement">setf</span><span class="lispList"> </span><span class="Type">*test-form2*</span><span class="lispList"> </span><span class="Special">'</span><span class="Special">(</span><span class="lispAtomList">func int foo </span><span class="Special">((</span><span class="lispAtomList">long-long arg</span><span class="Special">))</span>
<font color="#804040">143 </font><span class="lispLeadWhite">                          </span><span class="lispAtomList">:comment </span><span class="Constant">&quot;quite a simple foo function&quot;</span>
<font color="#804040">144 </font><span class="lispLeadWhite">                          </span><span class="lispAtomList">:body </span><span class="Special">(</span><span class="Statement">return</span><span class="lispAtomList"> </span><span class="Special">(</span><span class="Statement">+</span><span class="lispAtomList"> arg 1</span><span class="Special">)))</span><span class="Special">)</span>
<font color="#804040">145 </font>
<font color="#804040">146 </font><span class="Special">(</span><span class="Statement">defun</span><span class="lispList"> </span><span class="lispSymbol">test-seq0</span><span class="lispList"> </span><span class="Special">()</span>
<font color="#804040">147 </font><span class="lispLeadWhite">  </span><span class="Special">(</span><span class="lispSymbol">process-ast-list</span><span class="lispList"> </span><span class="Constant">23</span><span class="lispList"> </span><span class="Type">*test-form1*</span><span class="Special">)</span>
<font color="#804040">148 </font><span class="lispLeadWhite">  </span><span class="Comment">;(process-ast-list 778 '(test &quot;test.c&quot;))</span>
<font color="#804040">149 </font><span class="lispLeadWhite">  </span><span class="Special">)</span>
<font color="#804040">150 </font>
</pre>
</body>
</html>
